#pragma once
#include "Door.h"
#include "Timer.h"
#include "../SGD Wrappers/SGD_Listener.h"
#include "../SGD Wrappers/SGD_Handle.h"
#include <vector>

class SGD::HAudio;


class SpawnDoor : public Door
{
private:
	int enemyType = 0;
	int m_nNumEnemies = 0;
	int m_nMaxEnemies = 0;

	SGD::HAudio* alarmSound = nullptr;
	SGD::HVoice voice = SGD::INVALID_HANDLE;
	bool isActive = false;
	Timer spawnTimer;
	int graphIndex;
	std::vector<int> m_vWaypoints;
	bool doneSpawning = false;
public:
	SpawnDoor();
	~SpawnDoor();

	virtual void Update(float dt)	 override;
	virtual void Render()			 override;
	virtual void HandleEvent(const SGD::Event* pEvent) override;
	virtual void HandleCollision(const IBase* pOther) override;
	void SetType(int _type) { enemyType = _type; }
	void SetMaxEnemyCount(int _numEnemies){ m_nMaxEnemies = _numEnemies; }
	void RemoveEnemy();
	int GetType(void)const { return enemyType; }
	std::vector<int>& GetWaypoints(void) { return m_vWaypoints; }

	void SetGraphIndex(int index){ graphIndex = index; }
	int GetGraphIndex(void) const { return graphIndex; }
	int GetNumEnemies(void) const { return m_nNumEnemies; }
	int GetMaxEnemyCount(void){ return  m_nMaxEnemies; }

};

